package com.hhs.storage.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author hhs
 * @since 2022-12-01
 */
@Data
public class Flow implements Serializable {
    //合同新建
    public static final int TYPE_CONTRACT = 1;
    //合同延期
    public static final int TYPE_CONTRACT_DEFER = 2;
    //临时合同
    public static final int TYPE_CONTRACT_TEMP = 3;
    private static final long serialVersionUID = 1L;
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 1 合同  2 延期合同 3 临时合同
     */
    private Integer type;

    private String mainId;

    /**
     * 流程创建人
     */
    private String creater;
    @TableField(exist = false)
    private String createrName;
    /**
     * 创建时间
     */
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 流程状态
     */
    private Integer status;
    /**
     * 下级流程
     */
    private Integer statusJunior;

    /**
     * 流程执行人
     */
    private String operator;

    /**
     * 执行时间
     */
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime operateTime;

    /**
     * 备注
     */
    private String remark;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @TableField(exist = false)
    private Contract contract;

    //数据格式json串，当流程状态时修改数据时，存入
    private String jsonData;
}
